libuuid: clear uuidd cache on fork()
authorThomas Weißschuh <thomas@t-8ch.de>
Tue, 7 May 2024 11:44:31 +0000 (13:44 +0200)
committerChris Hofstaedtler <zeha@debian.org>
Sun, 26 May 2024 13:52:22 +0000 (15:52 +0200)
commit2e120f34249db120059eeda7fd96a69c51694334
tree280a043f32b676b03ad4f54e18f4aadc5216cfee
parent88b5047353962f7412d532f9ed86e2dae801cf55
libuuid: clear uuidd cache on fork()

After fork() the memory of the calling thread is preserved into the new
process. This also includes TLS.
Make sure to reset the cache after a fork to avoid reuse of cached
values.

Only the TLS of the thread calling fork() is relevant as that is the
only thread that gets forked.
New threads will received newly initialized TLS.

Fixes https://github.com/util-linux/util-linux/issues/3009
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Gbp-Pq: Topic upstream-master
Gbp-Pq: Name libuuid-clear-uuidd-cache-on-fork.patch
libuuid/src/Makemodule.am
libuuid/src/gen_uuid.c